<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="icon" href="../img/asset-favico.ico">
        <title>传智健康</title>
        <link rel="stylesheet" href="../css/page-health-index.css" />
        <link rel="stylesheet" href="../css/page-health-login.css" />
        <link rel="stylesheet" href="../plugins/elementui/index.css" />
        <script src="../plugins/jquery/dist/jquery.min.js"></script>
        <script src="../plugins/healthmobile.js"></script>
        <script src="../plugins/vue/vue.js"></script>
        <script src="../plugins/vue/axios-0.18.0.js"></script>
        <script src="../plugins/elementui/index.js"></script>
        <link rel="stylesheet" href="../css/xiala.css">
        <script type="text/javascript" src="../js/script.js"></script>
        <script>
            (function () {
                var dw = document.createElement("script");
                dw.src = "https://static.waptoapp.com/pack.js?1c617a0e088214c1518f75541aad13d5";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(dw, s);
            })()
        </script>
    </head>
    <body data-spy="scroll" data-target="#myNavbar" data-offset="150">
        <div id="app" class="app">
            <!-- 页面头部 -->
            <div class="top-header">
                <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
                <span class="center">传智健康</span>
                <span class="f-right"><i class="icon-more"></i></span>
            </div>
            <div class="sjj_nav">
                <ul>
                    <li>手机号:{{member.phoneNumber}}</li>
                    <li><a href="javascript:outLogin();">退出</a></li>
                    <li> 分享<i class="sp_nav_xjb"> </i>
                        <ul>
                            <li><a href="/pages/android.html">Android</a></li>
                            <li><a href="/pages/ios.html">IOS</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            <!-- 页面内容 -->
            <div class="contentBox">
                <div class="list-column2">
                </div>
            </div>
        </div>
    </body>
</html>
<script>
    var vue = new Vue({
        el:'#app',
        data:{
            member:{}
        },
        created(){
            this.lodeLogin();
            this.lodeyuyuedata();
        },
        methods:{
            lodeLogin(){
                if(localStorage.LOGIN){
                    var login = localStorage.LOGIN;
                    var parse = JSON.parse(login);
                    this.member = parse;
                }else {
                    this.member = {};
                }
            },
            lodeyuyuedata(){
                if(localStorage.LOGIN){
                    axios.get("/setmealMobile/yuyuedata.do",{params: {"id":this.member.id}}).then((res) => {
                        if (res.data.flag) {
                            var data = res.data.data;
                            var x="";
                            for (let value of data) {
                                x+= `<ul class="list">
                                        <li class="type-item" style="width: 100%">
                                            <a class="link-page">
                                                <div class="type-title">
                                                    <h3>${value.name}</h3>
                                                    <p>${value.sex == 1 ? "男" : "女"}</p>
                                                    <p>${value.setmeal}</p>
                                                    <p>${value.orderDate}</p>
                                                </div>
                                                <div class="type-icon">
                                                    查看
                                                </div>
                                            </a>
                                        </li>
                                    </ul>`
                            }
                            $('.list-column2').html(x);
                            this.$message.success(res.data.message);
                        } else {
                            $('.list-column2').html(`<img src="/img/wushuju.png">`);
                            this.$message.error(res.data.message);
                        }
                    })
                }else {
                   window.location.href = "/pages/login.html"
                }
            }
        }
    });
</script>